import sqlite3 as db
conn = db.connect('stroke-gb2312.sqlite')
cur = conn.cursor()

from json import loads
def fetch(code):
    cur.execute('select * from data where code=?', code)
    row = cur.fetchone()
    if row == None:
        return None
    return loads(row[1])

if __name__ == '__main__':
    print fetch(u'\u59b9')
